-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add ensure-compiled endpoint to control plane server #467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add ensure-compiled endpoint to control plane server #467
Conversation
|
|
View your CI Pipeline Execution ↗ for commit 2268eec
☁️ Nx Cloud last updated this comment at |
37bddc8 to
6ed062f
Compare
cbfdb88 to
4cd34c0
Compare
🔍 Preview Deployment: Website✅ Deployment successful! 🔗 Preview URL: https://pr-467.pgflow.pages.dev 📝 Details:
_Last updated: _ |
4cd34c0 to
fae2d4e
Compare
6ed062f to
5c1805a
Compare
Merge activity
|
# Add ensure-compiled endpoint to edge worker control plane This PR adds a new endpoint to the edge worker control plane API: `/flows/:slug/ensure-compiled`. This endpoint allows clients to verify that a flow's compiled SQL matches its expected shape, or to recompile it if needed. Key features: - Adds authentication via an API key header - Supports both "development" and "production" modes: - Development mode automatically recompiles flows when changes are detected - Production mode returns a 409 error when changes are detected (preventing unexpected changes) - Returns detailed information about differences between the expected and actual flow shapes - Integrates with a database SQL function for persistence The endpoint returns different status codes based on the result: - 200: Flow was verified, compiled, or recompiled successfully - 409: Flow shape mismatch detected in production mode - 400: Invalid request body - 401: Authentication failed - 404: Endpoint not configured - 500: Database error Comprehensive tests have been added to verify all functionality and edge cases.
fae2d4e to
c7eb99e
Compare
5c1805a to
2268eec
Compare

Add ensure-compiled endpoint to edge worker control plane
This PR adds a new endpoint to the edge worker control plane API:
/flows/:slug/ensure-compiled. This endpoint allows clients to verify that a flow's compiled SQL matches its expected shape, or to recompile it if needed.Key features:
The endpoint returns different status codes based on the result:
Comprehensive tests have been added to verify all functionality and edge cases.